import { defHttp } from '@/utils/http/axios'

enum Api {
  DATA_UNIT_TREE = '/main/data/unit/tree',
  UNIT_GROUP_LIST = '/main/data/unit/groupList',
  UNIT_LIST = '/main/data/unit/list',
  UNIT_LISTALL = '/main/data/unit/listAll'
  // DELETE_DATA = '/main/data/type/delete',
}

// export const addDataType = (data) => defHttp.post({ url: Api.ADD_DATA, data })
// export const updateDataType = (data) => defHttp.post({ url: Api.UPDATE_DATA, data })
// export const deleteDataType = (data) => defHttp.post({ url: Api.DELETE_DATA, data })
export const getDataUnitTree = () => defHttp.get({ url: Api.DATA_UNIT_TREE })
export const getUnitGroupList = () => defHttp.get({ url: Api.UNIT_GROUP_LIST })
export const getUnitList = (params) => defHttp.get({ url: Api.UNIT_LIST, params })
export const getUnitListAll = (params) => defHttp.get({ url: Api.UNIT_LISTALL, params })
